﻿/*
 * autor: Pedro Moreira, 10015 
 */

using System;
using System.Windows.Forms;

namespace rebides
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.ApplicationExit += new EventHandler(
                                               Program.OnApplicationExit);
            Application.Run(new rebides());
        }

        /// <summary>
        /// Método para garantir que, ao sair, 
        /// a thread de importação de csv termina
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private static void OnApplicationExit(object sender, EventArgs e)
        {
            CSV2SQL.cancel();
        }
    }
}
